import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/home",
      name: "home",
      component: () => import("../views/Home.vue"),
      meta: {
        menuName: "首页",
      },
    },
    {
      path: "/shop",
      name: "shop",
      component: () => import("../views/Shop.vue"),
      meta: {
        menuName: "商城",
      },
    },
    {
      path: "/user",
      name: "user",
      component: () => import("../views/User.vue"),
      meta: {
        menuName: "个人中心",
      },
    },
    {
      path: "/login",
      name: "login",
      component: () => import("../views/Login.vue"),
      meta: {
        menuName: "登录",
        hidden: true,
      },
    },
  ],
});

export default router;
